var jindu= new Vue({
    el : '#Jindulist',
    data:{
        xiangmuId:$("#xiangmuId").val(),
        xiangmuLeixing:$("#xiangmuLeixing").val(),
        xiangmu : {},
        jindulist : [],
        show : false,
        total:0,

    },
    created : function() {
        var _this = this;

        // $(".nav navbar-nav li").removeClass("active");
        // $("#nav_jindu").addClass("active");
        _this.findIsacticed();

        setInterval(function(){ _this.getjindulist(); }, 1000*10);
    },
    methods : {

        findIsacticed:function (){
            var _this = this;
            layer.open({type:3});
            $.post('/xiangmu/find_one', {
                xianmguid:_this.xiangmuId,
                rdm : Math.random()
            },function(ppData) {
                layer.closeAll("loading");
                if(ppData != null){
                    if(ppData.result == "1"){
                        var data = ppData.resultContent;
                        _this.xiangmu = data;
                        _this.getjindulist();

                    }else{
                        layer.alert(ppData.message);
                    }
                }
            },"json");
        },

        toback:function (){
            window.history.go(-1);
        },

        getjindulist:function (){
            var _this = this;
            layer.open({type:3});
            $.post('/TyController/getjindulist', {
                xiangmuid :_this.xiangmuId,
                xiangmuLeixing :_this.xiangmuLeixing,
                rdm : Math.random()
            },function(ppData) {
                layer.closeAll("loading");
                if(ppData != null){
                    if(ppData.result == "1"){
                        var data = ppData.resultContent;
                        _this.jindulist=data;
                        _this.show=true;
                    }else{
                        layer.alert(ppData.message);
                    }
                }
            },"json");
        },


    },
    watch :{

    }
})